#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int Fib(size_t N)
{
	if (N == 1 || N == 2)
	{
		return 1;
	}
	int i1 = 1, i2 = 1, i3 = 0;
	int j = 0;
	for (j = 0; j < N - 2;j++)
	{
		i3 = i1 + i2;
		i1 = i2;
		i2 = i3;
	}
	return i3;
}
int main()
{
	size_t N = 0;
	scanf("%zd", &N);
	int ret = Fib(N);
	printf("%d\n", ret);
	return 0;
}